from django.shortcuts import render
from django.shortcuts import render, redirect, reverse


# Create your views here.


def Index(request):
    # 判断用户是否登录
    if request.user.is_authenticated:

        return render(request, 'pmcs/index.html')
    else:
        # 未登录 重新回到登陆界面
        return redirect(reverse('users:login'))
